package com.mo.axion.web.vo.amis;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author Mo
 * @createTime 2024/4/15 18:51
 * @description 图标Vo
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class EchartsVo {

    /**
     * 标题
     */
    @JsonProperty
    private TitleVO title;

    /**
     * tooltip提示
     */
    @JsonProperty
    private TooltipVO tooltip;

    /**
     * legend 图例
     */
    @JsonProperty
    private LegendVO legend;


    /**
     * xAxis x轴
     */
    @JsonProperty
    private XaxisVO xAxis;

    /**
     * yAxis y轴
     */
    @JsonProperty
    private YaxisVO yAxis;


    @JsonProperty
    private List<SeriesVO> series;

    /**
     *  TitleVO
     */
    @Data
    @Builder
    public static class TitleVO {
        private String text;
    }

    /**
     * TooltipVO
     */
    @Data
    @Builder
    public static class TooltipVO {
        private String color;
    }

    /**
     * LegendVO
     */
    @Data
    @Builder
    public static class LegendVO {
        /**
         * data
         */
        private List<String> data;
    }

    /**
     * XAxisVO
     */
    @Data
    @Builder

    public static class XaxisVO {
        /**
         * data
         */
        private List<String> data;
    }

    /**
     * YAxisVO
     */
    @Data
    @Builder
    public static class YaxisVO {
        private String type;
    }

    /**
     * SeriesVO
     */
    @Data
    @Builder
    public static class SeriesVO {
        /**
         * name
         */
        private String name;
        /**
         * type
         */
        private String type;
        /**
         * data
         */
        private List<Integer> data;
    }
}
